﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="business_dialog_print.aspx.cs" Inherits="SF.Ucenter.admin.finance.business_dialog_print" %>

<%@ Import namespace="SF.Common" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>打印订单窗口</title>
<script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
<script type="text/javascript">
    var api = top.dialog.get(window); //获取父窗体对象
    //页面加载完成执行
    $(function () {
        //设置按钮及事件
        api.button([{
            value: '确认打印',
            callback: function () {
                printWin();
            },
            autofocus: true
        }, {
            value: '取消',
            callback: function () { }
        }]);
    });
    //打印方法
    function printWin() {
        var oWin = window.open("", "_blank");
        oWin.document.write(document.getElementById("content").innerHTML);
        oWin.focus();
        oWin.document.close();
        oWin.print();
        oWin.close();
        return false;
    }
</script>
</head>

<body style="margin:0;">
<form id="form1" runat="server">
<div id="content">
<table width="800" border="0" align="center" cellpadding="3" cellspacing="0" style="font-size:12px; font-family:'微软雅黑'; background:#fff;">
<tr>
  <td width="346" height="50" style="font-size:20px;">商户结算单</td>
  <td width="216">结算单号：<%=model.sf_finance_settlement_num%><br />
结算时间：<%=model.create_time %></td>
  <td width="220">商户名称：<%=model.businessName %><br />打印时间：<%=DateTime.Now%></td>
</tr>
<tr>
  <td colspan="3" style="padding:10px 0; border-top:1px solid #000;">
  <asp:Repeater ID="rptList" OnItemDataBound="rptList_ItemDataBound" runat="server">
      <ItemTemplate>
          <table width="100%" border="0" cellspacing="0" style="font-size:12px; font-family:'微软雅黑'; background:#fff; margin:10px 0px 2px 0px; ">
              <tr>
                <td width="33%">服务号名称：<%#Eval("appid_name" )%></td>                
                <td width="33%">生成时间：<%#Eval("create_time" )%></td>
                <td width="34%">总金额：<%#Eval("total_amount" )%></td>
              </tr>
          </table>

          <asp:Repeater runat="server" ID="rpOrderlist">
            <HeaderTemplate>
                <table width="100%" border="0" cellspacing="0" style="font-size:12px; font-family:'微软雅黑'; background:#fff;">
                    <tr>
                        <td width="33%" align="left" style="background:#ccc;">订单编号</th>
                        <td width="33%" align="left" style="background:#ccc;">销售价</td>
                        <td width="34%" align="left" style="background:#ccc;">结算金额</td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("order_num " )%></td>
                        <td><%#Eval("payMoney" )%></td>
                        <td><%#Eval("amount" )%></td>
                    </tr> 
                </ItemTemplate>
                <FooterTemplate>
                </table>
                </FooterTemplate>
        </asp:Repeater>
      </ItemTemplate>
  </asp:Repeater>
  </td>
  </tr>
<tr>
  <td colspan="3" style="border-top:1px solid #000;">
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" style="font-size:12px; font-family:'微软雅黑'; background:#fff;">
      <tr>
        <td align="right">合计金额：￥<%=model.total_amount%></td>
      </tr>
    </table>

  </td>
  </tr>
</table>
</div>
</form>
</body>
</html> 